--- In [email protected], "vegar410"
Hi buddy,

This is mine first suggestion to anybody since i am also a newbie.
Recently i have created a report with dynamic control. that is
controls are generated on to runtime as per the requirement.

i hope you can do the same becauce by only pushing the property you c
an manage things better.

i am pasting some do have a look and feel freee to make a mail at
Axapta Village where i am regular village if you have any query.

Here the data is populated with the help direct query execution at
back end.


void mastermethod()
{
      Connection   con=new Connection();
      Statement    sqlstm=Con.createStatement();
      Resultset    rs,rs1;
      Notes        sqlstr,sqlstr1;
      str    15    compInfo;
      Date         lastDate;
      int          q;
      ;
      delete_From FinalRS;
      select firstonly dataarea;
      compInfo=dataarea.company();
      sqlstr1=strfmt("select max(dueDate) from sredpstructLines
A,Fcfrtable B where A.DRNo=B.TmpDRNo And A.DRDP=2 and A.DATAAREAID='%
1' ",compInfo);
      rs1=sqlstm.executeQuery(sqlStr1);
      while(rs1.next())
      {
          lastDate=rs1.getDate(1);
      }
      sqlStr =strfmt("Select month(B.Duedate),year(B.DueDate),sum
(B.Principal)+sum(B.FinCharges) "+
                     "from FCFRTable A,sreDPStructLines B where
A.TmpDRNo=B.DrNo and B.DRDP=2 and "+
                     "month(B.Duedate) between 1 and 12 and year
(B.Duedate) between %1 and %2 "+
                     "and A.DATAAREAID='%3' group by month
(B.DueDate),year(B.DueDate) " ,Year(FromDate),Year
(lastDate),compInfo);
                      rs=sqlstm.executeQuery(sqlStr);
                      while(rs.next())
                      {
                       ttsbegin;
                       FinalRS.TmpMonth=rs.getString(1);
                       FinalRS.TmpYear=rs.getString(2);
                       FinalRS.TmpSum=rs.getreal(3);
                       FinalRs.insert();
                       ttscommit;
//                     info(strfmt('Year -%1,Month -%2,Amount -%
3',rs.getString(1),rs.getString(2),rs.getString(3)));
                      }

      q=any2int(Year(FromDate));
      while(q<=any2int(Year(LastDate)))
      {
            allYears+=q;
            q+=1;
      }
}

here the populated data is printed with the help of dynamic controls.
Much more code is there i hava given relevant part to you.


public void executeSection()
{
    reporttextcontrol rtc,rtc1;
    reporttextcontrol rtc2,rtc3;
    str 15            keep;
    int NoOfYr,i,a;
    int Xptr,Yptr;
    reportrealcontrol mew;
    reportdatecontrol mew1;
    units u;
    ;
    u = units::Char;

    rtc=this.addTextControl("Future Cash Flow Report");
    rtc.left(120,Units::mm);
    rtc.underline(true);
    rtc.top(1,u);
    rtc.bold(7);
    rtc.fontSize(16);

    this.mastermethod();
    NoOfYr=conlen(allYears);
    for(i=1;i<=NoOfYr;i++)
    {
          rtc1=this.addTextControl(strfmt("%1",conpeek(allYears,i)));
          rtc1.name(strfmt("%1",conpeek(allYears,i)));
          rtc1.height(1,units::Char);
          rtc1.width(20,u);
          rtc1.alignment(3);
          rtc1.bold(7);
          rtc1.top(25,units::mm);
          rtc1.underline(true);
          rtc1.left((20+a),Units::mm);
          a+=30;
    }
    while select FinalRS
    {
          for(i=1;i<=NoOfYr;i++)
          {
                If(FinalRS.TmpYear==strrem(this.controlName(strfmt("%
1",conpeek(allYears,i))).treeNodeName(),"Text :"))
                {
                    Xptr=this.controlName(strfmt("%1",conpeek
(allYears,i))).left100mm();
                }
          }
          switch(FinalRs.TmpMonth)
          {
            case '1':
                        Yptr=32;
                        break;
            default :
                        Yptr=(32+ (8*(str2int(FinalRs.TmpMonth)-1)));
                        break;
          }
          rtc2=this.addtextControl(num2str(FinalRs.TmpSum,4,2,1,2));
          rtc2.height(1,units::Char);
          rtc2.width(20,u);
          rtc2.left100mm(Xptr);
          rtc2.top100mm(Yptr*100);
          rtc2.alignment(3);
    }

    While select FinalRs group by TmpYear
    {
          for(i=1;i<=NoOfYr;i++)
          {
                If(FinalRS.TmpYear==strrem(this.controlName(strfmt("%
1",conpeek(allYears,i))).treeNodeName(),"Text :"))
                {
                    keep=strrem(this.controlName(strfmt("%1",conpeek
(allYears,i))).treeNodeName(),"Text :");
                    Xptr=this.controlName(strfmt("%1",conpeek
(allYears,i))).left100mm();
                    select sum(TmpSum) from FinalRs1 where
FinalRs1.TmpYear==keep;
                    print keep;
                    rtc3=this.addtextControl(num2str
(FinalRs1.TmpSum,4,2,1,2));
                    rtc3.height(1,units::Char);
                    rtc3.bold(7);
                    rtc3.width(20,u);
                    rtc3.lineAbove(1);
                    rtc3.lineBelow(7);
                    rtc3.alignment(3);
                    rtc3.left100mm(Xptr);
                    rtc3.top(132,units::mm);
                }
          }
    }
    super();
}
Have a nice time bye.

Form ashish singh
<[EMAIL PROTECTED]> wrote:
>
>
> Hmm..? I cannot find any property to rotate controls in Axapta
> reports.
>
> regards
> Vegar
>
> --- In [email protected], "Nitesh" <[EMAIL PROTECTED]>
> wrote:
> >
> > hi Vegar Imsland,
> >
> > try to set the properties of the control in which u r printing
the
> Barcode
> > as u require
> >
> > Nitesh
> >
> > ----- Original Message -----
> > From: "vegar410" <[EMAIL PROTECTED]>
> > To: <[email protected]>
> > Sent: Friday, March 11, 2005 2:42 PM
> > Subject: [development-axapta] Vertical barcode on report
> >
> >
> > >
> > >
> > >
> > > I am trying to print a barcode vertically in the upper left
> corner
> > > of a report. I found some suggestions on how to do this on
> > > previously posted messages, but none of them worked.
> > >
> > > Any suggestions on how to do this?
> > >
> > > regards
> > > Vegar Imsland
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Yahoo! Groups Links
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >







Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to