cancel
Showing results for 
Search instead for 
Did you mean: 

Avoid refresh when I run a macro

former_member605329
Participant
0 Kudos

Hi everybody!

Someone knows if I can avoid refresh the report when I run a macro that insert a new row in the report??

Because all info that I see is for refresh, but i want avoid this refresh....

The problem is in the report I choose with a EPMSELECTMEMBER one member, when I run a macro, first the macro insert the row with this member that I selected before, but automatically BPC refresh the report. If this new row has not  data,  BPC erase the row that macro was inserted.

I can not use the addmember normal of BPC because the macro does other things

Thanks so much in advance!!

Regards,

Jose Blesa

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186338
Active Contributor
0 Kudos

Hi Jose,

It will disappear even if you do it manually (not with a macro)!

You have to disable remove empty or zero... to insert a line with member recognition.

Please describe your input logic with sample - what do you want to achieve!

Vadim

former_member605329
Participant
0 Kudos

First I active the members recognition and I choose one member in a cell. After, when I run the macro, it gets this member selected and it add in the last row of the report,

If I can disable remove empty or zero with a macro it will be the solution I think, but I don't know how i do this.

Thanks for help me Vadim

Jose Blesa

former_member186338
Active Contributor
0 Kudos

First of all test this scenario without macro! Ensure it's OK!

To disable or enable "Remove empty..." in the macro use documented API SetSheetOption

Option 16

Vadim

former_member605329
Participant
0 Kudos

Thanks for help me Vadim

I tried to disable "Remove empty...." in the macro but it didn't run well.

Finally, I could do it adding one dummy report and using dimension override + macros. With all of them I could solve the issue.

Regards,

Jose Blesa

former_member186338
Active Contributor
0 Kudos

Strange: "I tried to disable "Remove empty...." in the macro but it didn't run well." - but what is the issue? In my tests it works exactly as expected (same way as manual Edit Report...)

Vadim

former_member605329
Participant
0 Kudos

I agree with you. The issue was that I can not disable "Remove empty..." because If I did, the report didn't refresh ( I have a lot of members without data). Therefore, I could solve with a new report, and the dimension override add the new member and the report doesn't erase because this new report has disable "Remove empty".

Finally I have two reports:

          Report 1 ( With a disable "Remove empty...)

          Report 2 ( With keep all)

Regards,

Jose Blesa

former_member186338
Active Contributor
0 Kudos

Another option is to programmatically add members to row axis using (instead of member recognition):

epm.AddMemberToRowAxis(WorkSheet,ReportID,MemberName,DynamicRelation)

with DynamicRelation=1

Vadim