Page 1 of 1

hwo to decrypt the field in mrt?

Posted: Sun Feb 17, 2013 7:49 am
by fjaweihyafie
Thans for every one , now I had the solution , we can add the dll assembly reference in mrt and code with C# , glad to share with you!

-------------------Origianl question---------------
I created datasource in mrt , now I select a "UserID" field from database , but the "UserID" has been encrypted before storing into the database by a method in dll including decryption and ecrypting method .

Now I need to decrypt it to show on the report page , when selected from database it is encrypted . Can I solve it just in "mrt" files ? Or please share you views .

Dose anyone can help me to give a solution .

Thanks.

Re: hwo to decrypt the field in mrt?

Posted: Mon Feb 18, 2013 7:32 am
by Alex K.
Hello,

Ok.
Let us know if you need any additional help.

Re: hwo to decrypt the field in mrt?

Posted: Mon Feb 18, 2013 10:28 am
by fjaweihyafie
Now I had now problems , I need to hide the form when it loaded in some reasons , so I had tried code " frm22TaxReport.Visible = IsShowParamForm; " ,"IsShowParamForm" is a Variable defined in my " mrt" file to control the visible property of the form. But I get the error -- "Form that is already visible cannot be displayed as a modal dialog box. Set the form's visible property to false before calling showDialog." Could you help me ? Thanks.

Re: hwo to decrypt the field in mrt?

Posted: Mon Feb 18, 2013 11:02 am
by Alex K.
Hello,

Can you please clarify in which moment do you try to set this property?
Please send us a sample report which reproduces the issue for analysis.

Thank you.

Re: hwo to decrypt the field in mrt?

Posted: Tue Feb 19, 2013 2:12 am
by fjaweihyafie
Aleksey wrote:Hello,

Can you please clarify in which moment do you try to set this property?
Please send us a sample report which reproduces the issue for analysis.

Thank you.
Hi,here is a sample mrt file. There is a fomr window named "Form1" and a variable named "IsShowParamForm" ,when "True" the Form1 should show on the screen ,when "False" the Fomr1 should hide by the "IsShowParamForm" value . This is my target.I code "Form1.Visible = IsShowParamForm" in the "LoadForm" event of the Form1,when the "IsShowParamForm" set to "False" ,the error ocured .
Thanks for you help.

----Add---
when I code

Code: Select all

if(IsShowParamForm == false)
{
	frm22TaxReport.Visible = false;
}
it works correctly ,I doubt why code

Code: Select all

Form1.Visible = IsShowParamForm
is incorrect .

Re: hwo to decrypt the field in mrt?

Posted: Tue Feb 19, 2013 9:17 am
by HighAley
Hello.

Because the Form is already loading. You should get next error message:
Form that is already visible cannot be displayed as a modal dialog box. Set the form's visible property to false before calling showDialog.
If you need do disable form, you should to it before showing report.

Thank you.

Re: hwo to decrypt the field in mrt?

Posted: Tue Feb 19, 2013 10:03 am
by fjaweihyafie
fjaweihyafie wrote:
Aleksey wrote:Hello,
when I code

Code: Select all

if(IsShowParamForm == false)
{
	frm22TaxReport.Visible = false;
}
it works correctly ,I doubt why code

Code: Select all

Form1.Visible = IsShowParamForm
is incorrect .
Should I code in "Begin Render" in the Reprot event ? I still doubt what I mentioned ,so I quoted it ,the to ways to set the form invisible , why the first is correct ,and another is got errors.
Thanks

Re: hwo to decrypt the field in mrt?

Posted: Wed Feb 20, 2013 9:35 am
by HighAley
Hello.

This code in the Begin Render event will work right.
To give you an answer why the first code is right we need to know where do you use it and what is the frm22TaxReport?

Thank you.

Re: hwo to decrypt the field in mrt?

Posted: Thu Feb 21, 2013 6:37 am
by fjaweihyafie
Aleksey Andreyanov wrote:Hello.

This code in the Begin Render event will work right.
To give you an answer why the first code is right we need to know where do you use it and what is the frm22TaxReport?

Thank you.
all the code writed in the "load form" event and frm22TaxReport is the form name ,just as the code "Form1" as mentioned former

Re: hwo to decrypt the field in mrt?

Posted: Fri Feb 22, 2013 6:20 am
by HighAley
Hello.

Did you try to use Begin Render event?

Thank you.